<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>申请报错</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../../../css/mui.min.css">
		<link rel="stylesheet" href="../../../css/app.css">
		<style>
			.mui-bar-nav~.mui-content{padding:0;position:absolute;width:7.5rem;height:100%;top:0;left:0;background:#fff;padding-top:45px;}
	        /*基本信息*/
	        .control_cont{width:100%;float:left;overflow:auto;}
	        .basic_info{width:100%;float:left;padding:.15rem 0 0;margin:0;}
		    .basic_info>li{width:7.28rem;line-height:1rem;border-bottom:1px solid #e5e5e5;float:right;}
		    .basic_info>li>label,.basic_info>li>a>label{width:1.8rem;float:left;text-align:left;font-size:.3rem;color:#333;box-sizing:border-box;padding-left:.25rem;}
		    .basic_info>li>span,.basic_info>li>a>span{font-size:.3rem;color:#9d9d9d;width:5.3rem;float:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
			.form_control{width:7.07rem;float:left;padding:.3rem .4rem;box-sizing:border-box;line-height:.45rem;color:#9d9d9d;font-size:.3rem;border:none;height:3.4rem;background:#f3f3f3;}
			.surplus{width:7.07rem;float:left;line-height:.3rem;color:#999;text-align:right;font-size:.3rem;}
			.mui-btn-primary{width:6rem;height:.85rem;background:#1653fc;color:#fff;border-radius:.1rem;overflow:hidden;margin:.8rem .75rem;float:left;font-size:.34rem;border-color:#1653fc;}
		</style>
	</head>
	<body>
		<div class="mui-content">
			<ul class="basic_info">
			 	<li>
			 		<label>证照名称：</label>
			 		<span id="license_name">身份证</span>
			 	</li>
			 	<li style="border:none;">
			 		<label>报错描述：</label>
			 		<textarea class="form_control" placeholder="请输入报错描述" id="correctionDesc"></textarea>
			 		<div class="surplus">最多可以输入1000字</div>
			 	</li>
		    </ul>
		    <button type="button" class="mui-btn mui-btn-primary ripple" id="submit">提交</button>
		</div>
	<script src="../../../js/mui.min.js"></script>
	<script src="../../../js/common.js"></script>
	<script>
		 var oid="";
		 var licenseName="";
		 mui.plusReady(function() {
			 oid = utils.getUrlParam("oid");
			 licenseName = localStorage.getItem("licenseName");
			 document.getElementById("license_name").innerHTML = licenseName;
		});
		
		
		/**
		 * 保存预约信息
		 */
		document.getElementById('submit').addEventListener('tap', function() {
			var  correctionDesc = document.getElementById("correctionDesc").value;
			if (correctionDesc == '' || correctionDesc == undefined || correctionDesc == '请输入报错描述' || correctionDesc.trim() == '') {
				mui.toast('报错描述不能为空！');
				return false;
			}else{
				if(correctionDesc.length>1000){
					mui.toast('报错描述不能超出最大限制字数！');
					return false;
				}
				var url = "appHttpService/appSaveEleclicenCorrection.do";
				var param = 'eleclicenId='+oid + '&correctionDesc='+correctionDesc.trim() ;
				utils.ajax(url,function(data){
					data = JSON.parse(data);
					if (data.code == 0 || data.code == '0' ) {
						mui.toast('保存成功！');
						setTimeout(function(){
							 mui.back();
						},1000)
					}else{
						mui.toast('保存出错！请联系管理员');
					    return false;
					}
				},param,null);
			}
			
			
		});
	</script>
	
	</body>
</html>
